package com.dc.designPattern._21_strategy.impl;

import com.dc.designPattern._21_strategy.impl.fly.FlyWithRocket;

/**
 * Description: 策略模式_太空鸭
 * @author: gdc
 * @date: 2021/6/9
 * @version 1.0
 */
public class SpaceDuck extends Duck {

    public SpaceDuck() {
        super();
        super.setFlyingStragety(new FlyWithRocket());
    }

    @Override
    public void display() {
        System.out.println("我头戴宇航头盔");
    }

    @Override
    public void speak() {
        System.out.println("我通过无线电与你通信");
    }
}
